package com.jia.train.batch.feign;

import com.jia.train.global.response.BaseResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.Date;

@FeignClient(name = "train-seat", path = "/api/seat")
//@FeignClient(name = "train-seat", url = "http://localhost:8082", path = "/api/seat")
public interface TrainSeatFeignClient {

    @GetMapping("/index")
    public String index();

    @PostMapping("/daily/trips/gen-daily/{date}")
    public BaseResponse<String> genDailyTrip(@PathVariable @DateTimeFormat(pattern = "yyyy-MM-dd") Date date);

}
